package com.love.cloud.common.mybatis.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Column;
import javax.persistence.MappedSuperclass;

/**
 * @author hongdongqu
 * @version 1.0
 */
@Data
@MappedSuperclass
@EqualsAndHashCode(callSuper=false)
public class BaseEntity extends SimpleBaseEntity {

    /**
     * 创建人
     */
    @TableField(fill = FieldFill.INSERT)
    @Column( columnDefinition = "VARCHAR(255) COMMENT '创建人'")
    private String creator;

    /**
     * 创建人id
     */
    @TableField(fill = FieldFill.INSERT)
    @Column(name="creator_id", columnDefinition = "VARCHAR(255) COMMENT '创建人id'")
    private String creatorId;

    /**
     * 创建人部门id
     */
    @TableField(fill = FieldFill.INSERT)
    @Column(name="creator_dept_id", columnDefinition = "VARCHAR(255) COMMENT '创建人部门ID'")
    private String creatorDeptId;

    /**
     * 创建人部门路径
     */
    @TableField(fill = FieldFill.INSERT)
    @Column(name="creator_dept_path", columnDefinition = "VARCHAR(255) COMMENT '创建人部门路径'")
    private String creatorDeptPath;

    /**
     * 创建人部门名称
     */
    @TableField(fill = FieldFill.INSERT)
    @Column(name="creator_dept_name", columnDefinition = "VARCHAR(255) COMMENT '创建人部门名称'")
    private String creatorDeptName;
}
